<template>
  <el-table
    :data="tableData"
    style="width: 100%"
    :default-sort="{ prop: 'date', order: 'descending' }"
  >
    <el-table-column
      v-for="(columu, index) in columns"
      :key="index"
      :prop="columu.prop"
      :label="columu.label"
    >
      <template slot-scope="scope">
        <span v-if="scope.row[columu.actions]">actios</span>
        <span v-else>{{ scope.row[columu.prop]}}{{scope.row[columu.actions]}}</span>
      </template>
    </el-table-column>
  </el-table>
</template>
<script>
export default {
  props: {
    tableData: {
      type: Array,
      default: () => [],
      require: true
    },
    columns: {
      type: Array,
      default: () => [],
      require: true
    }
  }
}
</script>
